import request from "@/utils/request";

export function getIndexData(params) {
  return request({
    url: "/common/site/getIndexData", //
    method: "post",
    params
  });
}
export function getNewData(params) {
  return request({
    url: "/front/advisement/pageByQo", //
    method: "post",
    params
  });
}
export function getNewDetail(params) {
  return request({
    url: "/front/advisement/getById", //
    method: "post",
    params
  });
}
//单个查询（详情）获取Code
export function advisementByCode(code) {
  return request({
    url: "/front/advisement/getVoByCode",
    method: "post",
    params: {
      code
    }
  });
}

export function commitFeedback(params) {
  return request({
    url: "/common/feedback/commit", //
    method: "post",
    params
  });
}
//店铺详情
export function getShopPageByQo(params) {
  return request({
    url: "/front/member/shop/pageByQo",
    method: "post",
    params
  });
}
//店铺详情
export function getShopInfo(id) {
  return request({
    url: "/front/member/shop/getMemberInfo",
    method: "post",
    params: {
      id: id
    }
  });
}
//店铺明细
export function shopItemListByQo(params) {
  return request({
    url: "/front/member/shop/item/listByQo",
    method: "post",
    params
  });
}
//店铺明细详情
export function shopItemGetById(params) {
  return request({
    url: "/front/member/shop/item/getById",
    method: "post",
    params
  });
}
//商品分页
export function productPageByQo(params) {
  return request({
    url: "/front/product/pageByQo",
    method: "post",
    params
  });
}
//商品分类
export function pageVoByQo(params) {
  return request({
    url: "/front/category/pageVoByQo",
    method: "post",
    params
  });
}
//商品详情
export function productGetById(id) {
  return request({
    url: "/front/product/getById",
    method: "post",
    params: {
      id: id
    }
  });
}
//收藏或取消收藏（商品或店铺）
export function collect(params) {
  return request({
    url: "/front/collect/collect",
    method: "post",
    params: params
  });
}

//创建询价单
export function inquiryCommit(params) {
  return request({
    url: "/front/inquiry/commit",
    method: "post",
    params
  });
}

//数据中心-获取总数据（总营业额，平台会员、月活跃会员、平台供应商、平台采购商）
export function dataCenterGetReport(type) {
  return request({
    url: "/common/dataCenter/getReport",
    method: "post",
    params: {
      type: type
    }
  });
}

export function dataCenterGetMap(type) {
  return request({
    url: "/common/dataCenter/getMap",
    method: "post",
  });
}

//获取网站首页分类数据
export function getIndexCategoryData(params) {
  return request({
    url: "/common/site/getIndexCategoryData",
    method: "post",
    params
  });
}

//获取众茶云仓列表数据
export function StorePageVoByQo(params) {
  return request({
    url: "/dinner/store/pageVoByQo",
    method: "post",
    params
  });
}
//获取直播列表
export function LiveQueryList(params) {
  return request({
    url: "/dinner/live/queryList",
    method: "get",
    params
  });
}
//获取评论列表
export function CommentList(params) {
  return request({
    url: "dinner/comment/commentList",
    method: "post",
    params
  });
}

//众茶国际协议
export function getAggreement(params) {
  return request({
    url: "front/advisement/getById",
    method: "post",
    params
  });
}

//活动报名
export function activitySignUp(params) {
  return request({
    url: "/common/activity/signUp",
    method: "post",
    params
  });
}

//线上展展会资讯
export function getDinnerAdvisement(params) {
  return request({
    url: "/dinner/exhibit/category/getDinnerAdvisement",
    method: "post",
    params
  });
}

//经纪人专区
export function getAgentList(params) {
  return request({
    url: "/dinner/proxy/brand/list",
    method: "post",
    params
  });
}

//经纪人商品列表
export function getAgentGoodList(params) {
  return request({
    url: "/front/product/zcyxPageByQo",
    method: "post",
    params
  });
}